//
//  BaseNetManager.h
//  Btpin
//
//  Created by Vic on 2019/3/10.
//  Copyright © 2019 Vic. All rights reserved.
//

#import "AFHTTPSessionManager.h"

NS_ASSUME_NONNULL_BEGIN

typedef void (^requestSuccessBlock)(NSDictionary *responseObject);
typedef void (^requestFailureBlock)(NSError *error);

typedef NS_ENUM(NSInteger, RequestMethod) {
    GET,
    POST,
    PUT,
    DELETE,
    HEAD
};

@interface BaseNetManager : AFHTTPSessionManager

+ (instancetype)sharedManager;

- (void)requestWithMethod:(RequestMethod)method path:(NSString *)path params:(NSDictionary *)params successBlock:(requestSuccessBlock)success failurBlock:(requestFailureBlock)failure;

+ (void)requestWithMethod:(RequestMethod)method path:(NSString *)path params:(NSDictionary *)params successBlock:(requestSuccessBlock)success failurBlock:(requestFailureBlock)failure;

- (void)deallocManager;

@end

NS_ASSUME_NONNULL_END
